﻿using TheGameClient.Processes;
using Waaahsabi.Controls.DWM;

namespace TheGameClient
{
	public partial class MainPage
	{
		private void TaskBarStartMenuProgramExecuted(object sender, ProgramItemExecuteArgs e)
		{
			IProgram program = MasterUiFactory.Instance.CreateUI(e.InterfaceId) as IProgram;
			if (program == null)
				return;
			program.Version = e.ProgramVersion;
			program.ProgramId = e.ProgramId;
			program.Initialize();
			cnvActivePrograms.Children.Add(program.Control);
			taskBar.HideStartMenu();
		}
	}
}